package cn.sccl.dirms.dev.model;

import cn.sccl.common.exception.BusinessException;
import cn.sccl.common.model.BaseModel;

/**
* 
* 数据库表 t_dev_chart_ser 的实体对象
* Created by liupan on 2017-06-25.
*/
public class ChartSer extends BaseModel{
/**
*表名
*/
public final static String TABLE_NAME ="t_dev_chart_ser";

    private java.lang.String chartId;//
    private java.lang.String serName;//样例名称
    private java.lang.String serType;//样例类型：xaxis yaxis  series
    private java.lang.String viewType;//展示类型：line bar pie gaugs等

    public void setChartId(java.lang.String chartId){
    this.chartId = chartId;
    }

        public java.lang.String getChartId(){
    return this.chartId;
    }
    public void setSerName(java.lang.String serName){
    this.serName = serName;
    }

        public java.lang.String getSerName(){
    return this.serName;
    }
    public void setSerType(java.lang.String serType){
    this.serType = serType;
    }

        public java.lang.String getSerType(){
    return this.serType;
    }
    public void setViewType(java.lang.String viewType){
    this.viewType = viewType;
    }

        public java.lang.String getViewType(){
    return this.viewType;
    }

/**
* clone一个对象。
* @param cls 需要克隆的对象类型，只能是当前类的子类
* @param
<T>
    * @return
    * @throws IllegalAccessException
    * @throws InstantiationException
    */
    public
    <T extends ChartSer> T clone(Class
        <T> cls) {
            try {
            T t = cls.newInstance();
            t.setId(this.
            getId());
            t.setChartId(this.
            getChartId());
            t.setSerName(this.
            getSerName());
            t.setSerType(this.
            getSerType());
            t.setViewType(this.
            getViewType());
            t.setDeleteFlag(this.
            isDeleteFlag());
            t.setUpdateTime(this.
            getUpdateTime());
            t.setCreateTime(this.
            getCreateTime());
            return t;
            } catch (Exception e) {
            e.printStackTrace();
            throw new BusinessException("对象克隆失败，请克隆的目标对象是否具有无参的构造函数。", e.getCause());
            }
            }
            }